<?php
namespace app\common\model;

use think\Model;
use think\Db;


class Area extends Model
{
    protected $pk = 'id';
    protected $autoWriteTimestamp = true;
    protected $table = 'think_area';
    
    
   
    //搜索器
    public function searchTitleAttr($query, $value){
        
       if ($value) {
            $query->where('title', 'like', '%' . $value . '%');
        } 
        
    }
    public function searchFilesAttr($query, $value){
        
       if ($value) {
            $query->where('files', 'like', '%' . $value . '%');
        } 
        
    }
    
}


?>